package game.metalmax.packet.character {

	import flash.utils.ByteArray;
	
	import game.metalmax.packet.IPacket;
	import game.metalmax.packet.world.PObjectHolder;

public class AddHeroRequest implements IPacket{

	public var hero:PObjectHolder = null;

	public function write(out:ByteArray):void{
		var len:int = 0;
		var i:int = 0;
		out.writeByte(hero==null?0:1);
		if(hero!=null) hero.write(out);
	}
	public function read(inn:ByteArray):void{
		var len:int = 0;
		var i:int = 0;
				if(inn.readByte() == 1){
hero= new PObjectHolder();
hero.read(inn);
		}
}
}
}